# https://gitee.com/yueyinqiu5990/codes-for-tj10053104/blob/master/supplement1/question2/main.py


def _parse_with_eval(input_string: str) -> tuple[str, str, int]:
    import warnings
    warnings.warn("方法 _parse_with_eval 已过时，请使用 _parse_with_csv 代替", DeprecationWarning)
    return eval(input_string)


def _parse_with_csv(input_string: str) -> tuple[str, str, int]:
    import csv
    reader = csv.reader([input_string])
    line = next(reader)
    return line[0], line[1], int(line[2])


def _main():
    input_string = input("姓名,专业,年级:")
    # name, major, grade = _parse_with_eval(input_string)
    name, major, grade = _parse_with_csv(input_string)
    print(name, "在同济大学", major, "专业", grade, "年级就读")


if __name__ == "__main__":
    _main()
